package io.jee.caisan.weixin;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNewsBatchGetResult;

@RunWith(SpringRunner.class)
@SpringBootTest
public class WeixinMedia {
	
	@Resource
	private WxMpService wxMpService;

	@Test
	public void contextLoads() throws WxErrorException {
		
		//WxMpMaterialCountResult wxMpMaterialCountResult = wxMpService.getMaterialService().materialCount();
		WxMpMaterialNewsBatchGetResult res = wxMpService.getMaterialService().materialNewsBatchGet(0, 20);
		System.out.println(res);
	}
}
